###########################################
# Trajectories and Effects One Week 
###########################################

rm (list = ls())

library(Hmisc)
library(readstata13)
library(foreign)
library(lmtest)
library(sandwich)
library(stargazer)
library(msm)
library(ggplot2)
library(did)
library(lfe)
library(gridExtra)

# load data
load("one_week_protests_riots_2024March1.RData")

##############
# Table A11
##############

m2_d = felm(support_eviction  ~ year2016 + year2017 + year2019 + year2020 + year2021 + year2022 + woman + age + education | year_f + idencuesta | 0 | idencuesta, data = d, keepCX = TRUE)
t2 = m2_d
m2_d = tidy(m2_d,conf.int = T)
m2_d

##############
# Table A12
##############

m4_d = felm(support_students  ~ year2016 + year2017 + year2019 + year2020 + year2021 + year2022 + woman + age + education | year_f + idencuesta | 0 | idencuesta, data = d, keepCX = TRUE)
t4 = m4_d
m4_d = tidy(m4_d,conf.int = T)
m4_d
